<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>定位</title>
    <style>
      body {
        margin: 20px;
        background-color: #ccc;
        position: relative;
        height: 2000px;
      }
      .box {
        width: 150px;
        height: 150px;
      }
      .box1 {
        background-color: rgb(250, 250, 158);
      }
      .box2 {
        background-color: rgb(13, 97, 214);
        position: fixed;
        bottom: 10px;
        right: 10px;
        /* bottom: 10px; */
      }
      .box3 {
        width: 200px;
        background-color: rgb(217, 180, 17);
      }
    </style>
  </head>
  <body>
    <div class="box box1"></div>
    <div>
      <div class="box box2"></div>
    </div>
    <div class="box box3"></div>
  </body>
</html>
